package com.huatai.dataservice.panel.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author lxc
 * @since 2023-03-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_system_message")
public class TbSystemMessage implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 试验id
     */
    @TableField("trialId")
    private String trialId;

    /**
     * 消息内容
     */
    @TableField("messageContent")
    private String messageContent;

    /**
     * 消息推送时间
     */
    @TableField("messageTime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss SSS")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss SSS",
            timezone = "GMT+8"
    )
    private Date messageTime;


}
